package body Verem_Pkg is

   procedure Push (V : in out Verem; E : in Elem) is
   begin
      V.Elemek(V.Elem_Szam):=E;
      V.Elem_Szam:=V.Elem_Szam+1;
   end Push;

   procedure Pop (V : in out Verem) is
   begin
      if (V.Elem_Szam/=0) then
         V.Elem_Szam:=V.Elem_Szam-1;
      end if;
   end Pop;

   function Top (V : Verem) return Integer is
   begin
      return V.Elemek(V.Elem_Szam-1);
   end Top;

   function Is_Empty (V : Verem) return Boolean is
   begin
      return V.Elem_Szam=0;
   end Is_Empty;

end Verem_Pkg;
